// 1.导入mockjs
import Mock, { Random } from 'mockjs'
Mock.Random.extend({
  slogan: () => {
    return '我们的追求是' + Random.csentence(5)
  },
  raise: () => {
    return Random.integer(6000, 9000) + '元/30天'
  },
  message: function () {
    var arr = [
      Random.region(),
      Random.integer(25, 40) + '岁',
      Random.integer(5, 10) + '年经验'
    ]
    return this.pick(arr)
  },
  special: () => {
    var arr = [
      '二星育婴师',
      '三星育婴师',
      '一星育婴师',
      '四星育婴师',
      '五星育婴师'
    ]
    return this.pick(arr)
  },
})
Mock.mock('/app/swipe', 'get', function () {
  const img = [
    { icon: require('@/assets/swiper1.jpg'), id: '0' },
    { icon: require('@/assets/swiper2.jpg'), id: '1' },
    { icon: require('@/assets/swiper3.jpg'), id: '2' }]
  return img
})

// company
Mock.mock('/app/homepagecompany', 'get', function () {
  const companytranstions = [
    {
      id: 0,
      img: { icon: require('@/assets/45.jpg'), id: '0' },
      company: '长沙市格格家政服务有限公司',
      slogan: '您的笑容（满意），我们的追求',
      label: ['协会成员', '服务好', '环境优美'],
      distance: 22.11,
      com_address: '湖南省长沙市星沙榔梨工业园大众...'
    },
    {
      id: 1,
      img: { icon: require('@/assets/hh.jpg'), id: '1' },
      company: '湖南金管家家政服务有限公司',
      slogan: '您的笑容（满意），我们的追求',
      label: ['协会成员', '服务好', '环境优美'],
      distance: 15.68,
      com_address: '湖南省长沙市高新区麓谷工业园f3栋...'
    }, {
      id: 2,
      img: { icon: require('@/assets/psc.jpg'), id: '2' },
      company: '玉佳缘家政',
      slogan: '您的笑容（满意），我们的追求',
      label: ['协会成员', '服务好', '环境优美'],
      distance: 10.38,
      com_address: '湖南省长沙市天心区暮云工业园开服曼城住宅...'
    }
  ]
  return companytranstions
})

// serviceStyle
Mock.mock('/app/servicestyle', 'get', function () {
  // const data = [
  //   '月嫂', '育婴师', '保洁/清洁', '保姆', '产康师', '早教/托育', '养老/陪护', '家装/搬家'
  // ]
  const data = [
    { icon: require('@/assets/iconbm.png'), id: '01', occ: '月嫂' },
    { icon: require('@/assets/iconys.png'), id: '11', occ: '育婴师' },
    { icon: require('@/assets/iconqj.png'), id: '21', occ: '保洁/清洁' },
    { icon: require('@/assets/icon02.png'), id: '31', occ: '保姆' },
    { icon: require('@/assets/iconlr.png'), id: '41', occ: '产康师' },
    { icon: require('@/assets/icon-yuyue.png'), id: '51', occ: '早教/托育' },
    { icon: require('@/assets/icon02.png'), id: '61', occ: '养老/陪护' },
    { icon: require('@/assets/icon1.png'), id: '71', occ: '家装/搬家' }
  ]
  return data
})
// servicer
Mock.mock('/app/servicer', 'get', function () {
  const data = [
    {
      id: 100,
      img: { icon: require('@/assets/zll.jpg'), id: '0' },
      name: '张丽丽',
      salary: '6000元/26天',
      label: ['三星育婴师', '5年工作经验', '耐心'],
      address: '长沙',
      age: '42',
      ser_num: '11',
      appraise: '13'
    },
    {
      id: 101,
      img: { icon: require('@/assets/ldm.jpg'), id: '0' },
      name: '李冬梅',
      salary: '7000元/26天',
      label: ['二星育婴师', '6年工作经验', '贴心'],
      address: '长沙',
      age: '45',
      ser_num: '10',
      appraise: '20'
    },
    {
      id: 102,
      img: { icon: require('@/assets/wch.jpg'), id: '0' },
      name: '王春花',
      salary: '9000元/26天',
      label: ['四星育婴师', '10年工作经验', '亲切'],
      address: '长沙',
      age: '42',
      ser_num: '15',
      appraise: '33'
    }
  ]
  return data
})
